﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" CodeFile="EditTrain.aspx.cs" Inherits="Manage_EditTrain" %>
<%@ Register Src="~/Manage/CmsMessageBox.ascx" TagName="MessageBox" TagPrefix="cms" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#Comment').width($('#Body table.Info').width());
            
             $('#<%=Save.ClientID %>').click(function () {
                var ds = [{ 'Controller': '#<%=Name.ClientID %>',
                    'Type': 'R',
                    'ErrorMessage': '请输入班级名称。',
                    'Clear': true,
                    'Focus': true
                }, { 'Controller': '#<%=Address.ClientID %>',
                    'Type': 'R',
                    'ErrorMessage': '请输入培训地点。',
                    'Clear': true,
                    'Focus': true
                }, { 'Controller': '#<%=Amount.ClientID %>',
                    'Type': 'RN',
                    'ErrorMessage': '请输入正确的学员人数。',
                    'Clear': true,
                    'Focus': true
                }, { 'Controller': '#<%=TeacherID.ClientID %>',
                    'Type': 'R',
                    'ErrorMessage': '还没有应邀教师或未选择授课教师。',
                    'Clear': false,
                    'Focus': false
                }];

                return Cms_ValidateForm(ds);
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="body" Runat="Server">
    <cms:MessageBox ID="MessageBox" runat="server" />
    <asp:HiddenField ID="TrainID" runat="server" />
    <asp:HiddenField ID="InviteID" runat="server" />
    <table class="Info" cellspacing="1">
        <tr>
            <td align="right" style="width: 100px">举办单位：</td>
            <td>
                <asp:Label ID="BelongLabel" runat="server"></asp:Label>
                <asp:HiddenField ID="Belong" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="right">班级名称：</td>
            <td>
                <asp:TextBox ID="Name" runat="server" Width="500px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">培训时间：</td>
            <td>
                <asp:DropDownList ID="Year" runat="server">
                </asp:DropDownList>年
                <asp:DropDownList ID="Month" runat="server">
                </asp:DropDownList>月
                <asp:DropDownList ID="Day" runat="server">
                </asp:DropDownList>日
                &nbsp;&nbsp;
                <asp:DropDownList ID="Hour" runat="server">
                </asp:DropDownList>时
                <asp:DropDownList ID="Minute" runat="server">
                </asp:DropDownList>分
            </td>
        </tr>
        <tr>
            <td align="right">培训地点：</td>
            <td>
                <asp:TextBox ID="Address" runat="server" Width="500px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">课程信息：</td>
            <td>
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td style="padding:0px; margin:0px;">
                            本次开设课程为：<asp:Label ID="KindLabel" runat="server"></asp:Label>&nbsp;-&nbsp;<asp:Label ID="SubjectLabel" runat="server"></asp:Label>&nbsp;-&nbsp;<asp:Label ID="CourseLabel" runat="server"></asp:Label>
                            <br />课程详细信息如下：
                            <asp:HiddenField ID="Kind" runat="server" />
                            <asp:HiddenField ID="Subject" runat="server" />
                            <asp:HiddenField ID="Course" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="padding:0px; margin:0px;">
                            <asp:TextBox ID="Memo" runat="server" Width="500px" Height="80px" TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right">授课教师：</td>
            <td>
                <asp:Label ID="AcceptedTeacher" runat="server"></asp:Label><asp:HiddenField ID="TeacherID" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="right">学员信息：</td>
            <td>
                <asp:TextBox ID="Required" runat="server" TextMode="MultiLine" Width="500px" Height="40px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">学员人数：</td>
            <td>
                <asp:TextBox ID="Amount" runat="server" Width="80px"></asp:TextBox>&nbsp;人
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="Save" runat="server" Text="保存" 
                    CssClass="Button" onclick="Save_Click" /></td>
        </tr>
    </table>
    <div id="Comment">
        <p>注：</p>
        <p>1、学员信息描述的字数限30字内。</p>
        <p>2、学员人数请在英文半角状态下输入数字。</p>
    </div>
</asp:Content>